//
//  ViewController.swift
//  SwiftAppKit
//
//  Created by JeffreyWW on 11/01/2022.
//  Copyright (c) 2022 JeffreyWW. All rights reserved.
//

import Alamofire
import RxSwift
import SwiftAppKit
import UIKit

class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = .white
        let btn = UIButton()
        view.addSubview(btn)
        btn.frame = CGRect(x: 0, y: 0, width: 100, height: 100)
        btn.center = view.center
        btn.setTitle("点我", for: .normal)
        btn.setTitleColor(.black, for: .normal)
        btn.addTarget(self, action: #selector(click(sender:)), for: .touchUpInside)
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    @objc private func click(sender _: UIButton) {
        let controller = TestViewController()
        AppContext.navigator.push(controller)
    }
}
